package com.sgcc.ln.pmos.e_ln_home.adapter;

import android.graphics.Color;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.sgcc.pmos.nativesdk.R;
import com.sgcc.ln.pmos.e_ln_home.bean.MarketSituationBean;

import java.util.List;

public class MarketSituationChartAdapter extends BaseQuickAdapter<MarketSituationBean.Data, BaseViewHolder> {


    public MarketSituationChartAdapter(List<MarketSituationBean.Data> data) {
        super(R.layout.item_market_situation_chart,data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, MarketSituationBean.Data bean) {
        baseViewHolder.setBackgroundColor(R.id.llLayout, Color.parseColor(getItemPosition(bean) == 0 ? "#1A1D9FFF" : "#FFFFFFFF"))
                .setText(R.id.tvText1,bean.getText1())
                .setText(R.id.tvText2,bean.getText2())
                .setText(R.id.tvText3,bean.getText3())

        ;




    }


}
